package cn.zswltech.gruul.common.dto;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author Jim
 * @version 1.0.0
 * @descripition:
 * @date 2024/2/26 11:26
 */
@Data
@Accessors(chain = true)
public class MenuTreeInfo implements Serializable {
    // groupId
    private Long id;
    // 菜单id
    private Long key;
    private Date gmtCreate;
    private Date gmtModified;
    private String code;
    private String title;
    private String name;
    private Integer showFlag;
    private Integer flag;
    private Integer sortNo;
    private Long parentTreeId;
    private String createBy;
    private String updateBy;
    private String icon;
    private String path;
    private String systemCode;
    private List<MenuTreeInfo> children;

    public void addChild(MenuTreeInfo menuTreeInfo){
        if (children == null){
            children = new ArrayList<>();
        }
        children.add(menuTreeInfo);
    }

}
